import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextField;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Rectangle;

import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import javax.xml.stream.events.Comment;

import com.sun.org.apache.xml.internal.security.encryption.Reference;

/**
 * 
 * this class for the help option
 *
 */
public class HelpWin extends JFrame  {

	

	private JPanel helpPanel;
	private JLabel lblHelp;
	private JLabel lblMsg1;
	private String msg1;
	private JLabel lblMsg2;
	private String msg2;
	
	/**
	 * @wbp.parser.constructor
	 */
	public HelpWin (String s){
		msg1 = s;
		initialize1();
	}
	
	public HelpWin (String s1, String s2){
		msg1 = s1;
		msg2 = s2;
		initialize2();
	}
	
	private void initialize1() {
		
		this.setSize(342, 187);
		this.setLocation(430, 200);
		helpPanel = new JPanel();
		getContentPane().add(helpPanel);
		helpPanel.setLayout(null);
		
		helpPanel.add(getOK());
		
		lblHelp = new JLabel("Help");
		lblHelp.setBounds(147, 11, 46, 14);
		helpPanel.add(lblHelp);
		
		lblMsg1 = new JLabel(msg1);
		lblMsg1.setHorizontalAlignment(SwingConstants.CENTER);
		lblMsg1.setBounds(-15, 55, 357, 14);
		helpPanel.add(lblMsg1);
		this.setTitle("Academic Managment Tool");
		this.setVisible(true);
	}	
	
	
	private JButton getOK()
	{
		JButton btnOKButton = new JButton("OK");
		btnOKButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				setVisible(false);
			}
		});
		btnOKButton.setBounds(120, 115, 89, 23);
		return btnOKButton;
	}
	
	private void initialize2() {
		
		this.setSize(342, 187);
		helpPanel = new JPanel();
		getContentPane().add(helpPanel);
		helpPanel.setLayout(null);
		this.setLocation(80, 80);
		
		helpPanel.add(getOK());
		
		lblHelp = new JLabel("Help");
		lblHelp.setBounds(147, 11, 46, 14);
		helpPanel.add(lblHelp);
		
		lblMsg1 = new JLabel(msg1);
		lblMsg1.setHorizontalAlignment(SwingConstants.CENTER);
		lblMsg1.setBounds(-15, 48, 357, 14);
		helpPanel.add(lblMsg1);
		
		lblMsg2 = new JLabel(msg2);
		lblMsg2.setHorizontalAlignment(SwingConstants.CENTER);
		lblMsg2.setBounds(-15, 65, 357, 14);
		helpPanel.add(lblMsg2);
		
		this.setTitle("Academic Managment Tool");
		this.setVisible(true);
	}	
	
	

	
}